package com.hdax.dm.mapstucts;

import com.hdax.dm.beans.user.User;
import com.hdax.dm.dto.querypersoninfoDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "Spring")
public abstract class querypersoninfoDtoMapper {

    @Mapping(source = "hobby",target = "interest")
    public abstract querypersoninfoDto toTarget(User source);

    public abstract List<querypersoninfoDto> toTargetList(List<User> sources);
}
